package com.gaofei.alipay.controller;

import com.gaofei.alipay.domain.Order;
import com.gaofei.alipay.domain.Trade;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController//@Controller   @ResponseBody
public class TestJsonController {

    @RequestMapping("test")
    public Object test(){
//        Order order = new Order();
//        order.setSign("IOwZLqY1eMu/EZpxKcB3YfkYoIXXn2TAOti");
//        Trade trade = new Trade();
//        trade.setCode(10000);
//        trade.setMsg("Success");
//        order.setAlipay_trade_query_response(trade);
        HashMap<String, Object> order = new HashMap<>();
        HashMap<String, Object> trade = new HashMap<>();
        trade.put("code", 10000);
        trade.put("msg", "Success");
        trade.put("out_trade_no", "9999");
        order.put("alipay_trade_query_response",trade);
        order.put("sign","IOwZLqY1eMu/EZpxKcB3YfkYoIXXn2TAOti");

        return order;
    }
}
